package com.wjc.server.dto;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

public class SmsDto {

    /**
     * id
     */
        private Long id;
    /**
     * 手机号
     */
        
        @NotBlank(message = "手机号不能为空")
        @Length(min=0,max = 50,message = "手机号字符长度过长")
        private String mobile;
    /**
     * 验证码
     */
        
        @NotBlank(message = "验证码不能为空")
        @Length(min=0,max = 6,message = "验证码字符长度过长")
        private String code;
    /**
     * 用途|枚举[SmsUseEnum]:R|注册,F|忘密
     */
        
        @NotBlank(message = "用途不能为空")
        
        private String use;
    /**
     * 生成时间
     */
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        @NotBlank(message = "生成时间不能为空")
        
        private Date at;
    /**
     * 状态|枚举[SmsStatusEnum]:U|已用,N|未用
     */
        
        @NotBlank(message = "状态不能为空")
        
        private String status;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getUse() {
        return use;
    }

    public void setUse(String use) {
        this.use = use;
    }

    public Date getAt() {
        return at;
    }

    public void setAt(Date at) {
        this.at = at;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", mobile=").append(mobile);
        sb.append(", code=").append(code);
        sb.append(", use=").append(use);
        sb.append(", at=").append(at);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }

}